package com.gzsxy.sso.common.dto.response;

/**
 * @author xiaolong
 * @version 1.0
 * @description: 默认响应
 * @date 2021/12/17 20:27
 */

public class DefaultResponse extends AbstractResponse {
    private static final  DefaultResponse response = new DefaultResponse((Object)null,0,200,"操作成功");

    public DefaultResponse(Object data, int level, int code, String msg) {
        super(data, level, code, msg);
    }

    public DefaultResponse() {
    }

    public static DefaultResponse ok(){
        return response;
    }

    public static DefaultResponse ok(Object data){
        return new DefaultResponse(data,0,200,"操作成功");
    }

    @Override
    public void setData(Object data) {
        super.data = data;
    }

    @Override
    public void setLevel(int level) {
        super.level = level;
    }

    @Override
    public void setCode(int code) {
        super.code = code;
    }

    @Override
    public void setMsg(String msg) {
        super.msg = msg;
    }





}
